package com.brainhealth.common.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * @author wll
 * 已训练次数和剩余训练次数告知
 */
public enum ProgressNotifyEnum {

    TWO(2, 1, 1),
    THREE(3, 3, 1),
    FOUR(4, 3, 1),
    FIVE(5, 3, 1),
    SIX(6, 3, 1),
    SEVEN(7, 3, 1),
    EIGHT(8, 3, 1),
    NINE(9, 3, 1),
    TEN(10, 2, 2),
    ELEVEN(11, 2, 2),
    TWELVE(12, 2, 2),
    THIRTEEN(13, 2, 2),
    FOURTEEN(14, 2, 2),
    FIFTEEN(15, 2, 2),
    SIXTEEN(16, 2, 2),
    SEVENTEEN(17, 2, 2),
    EIGHTEEN(18, 2, 2),
    NINETEEN(19, 2, 2),
    TWENTY(20, 2, 3),
    TWENTY_ONE(21, 2, 3),
    TWENTY_TWO(22, 3, 3),
    TWENTY_THREE(23, 3, 3),
    TWENTY_FOUR(24, 3, 3),
    TWENTY_FIVE(25, 3, 3),
    TWENTY_SIX(26, 3, 3),
    TWENTY_SEVEN(27, 3, 3),
    TWENTY_EIGHT(28, 3, 3);

    /**
     * 训练课程
     */
    private int current;

    /**
     * 已完成训练课程
     */
    private int completed;

    /**
     * 剩余训练课程
     */
    private int remind;

    ProgressNotifyEnum(int current, int completed, int remind) {
        this.current = current;
        this.completed = completed;
        this.remind = remind;
    }

    public static Map getCompletedMap() {
        Map result = new HashMap<Integer, Integer>();
        for (ProgressNotifyEnum notifyEnum : ProgressNotifyEnum.values()) {
            result.put(notifyEnum.current, notifyEnum.completed);
        }
        return result;
    }

    public static Map getRemindMap() {
        Map result = new HashMap<Integer, Integer>();
        for (ProgressNotifyEnum notifyEnum : ProgressNotifyEnum.values()) {
            result.put(notifyEnum.current, notifyEnum.remind);
        }
        return result;
    }

}
